guildwarsfandomcom-20200222-history
User talk:Hhhippo/BuildSearchEngine
How to implement it There are basically two pieces of code needed: The build search engine The actual searching, sorting and filtering can easily be done by a perl script. Assuming that each build page (even in user space) would have some category tag identifying it as a build page, the script would start by loading the category page, then follow all the links to gather information on each build, filter, sort, and return the requested list in wiki markup. How to call it: To keep network traffic low, the script would ideally run directly on the wiki server. It could also be hosted anywhere else on the net, we just need a web server where we can put a cgi script to a directory where the server will find and execute it. How to pass the search parameters: These can be collected just by a html form, if the wiki engine allows that. If not the search form would have to be hosted outside the wiki. On submit the form would call the script and pass the parameters either by appending them to the script's URL or as POST data. :Yet another idea: instead of filling a html form, the user could provide the search parameters on a page in his user space with well-defined name and layout. This way the parameters would be saved for further use, which would be particularly handy if advanced features are implemented which need a lot of input (a list of included/excluded PYB libraries, a list of users who's rating I trust, a list of elite skills I have available etc.). This would also make it easy to provide some examplary search patterns. --Hhhippo 15:12, 25 April 2007 (CDT) How to display the results: It would be nice if the wiki markup returned by the script would be displayed in the same way as other automatically generated pages on the wiki. We'd have to dig into the doku of mediawiki to find out if and how that's possible/allowed. Otherwise, the script could act like a bot and put the results on an ordinary wiki page. For example, it could create or replace User:/BuildSearchResults. This way the user could always come back to the results of his last search without running the search engine again. :Update: First test version of the search engine is working, see also User_talk:Hhhippo. --Hhhippo 11:02, 29 April 2007 (CDT) The summary box generator Again, parsing the build's talk page and creating the wiki markup for the box is easy in perl. To put it on the build page or replace an older version is again something that bots do. I'm not sure how to tell a script to write to a wiki page, but there are bots around here, so someone will know. The question is how to trigger this generator. Ideally it would be triggered whenever the talk page is saved. If the wiki engine won't do that, one could manually trigger it by an 'update' button on the build page. There could also be an external bot which regularly checks a watch list with all the build pages, but I don't think that's a good solution. Of course any automatic mechanism that's writing to the wiki would need admin approval! --Hhhippo 14:47, 25 April 2007 (CDT) Ummm... Uhh... is this for when we reconsider builds, cuz the wipe is soon --66.194.217.223 15:32, 25 April 2007 (CDT) :Yes, of course. It's an idea for after the wipe, might remove the disadvantages of some of the policy proposals. At the moment it looks like the PvXwiki people are more interested, so I might move there as well.--Hhhippo 11:02, 29 April 2007 (CDT)